class CartItem

  attr_reader :item, :quantity
  
  def initialize(item, quantity)
    @item = item
    @quantity = quantity
  end
  
  def name
    @item.name
  end
  
  def price
    @item.price * @quantity
  end
end
